home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cm100exe.zip / CM100EXE.EXE / SAMPLES / MASM / MAKEFILE < prev    next >
Text File  |  1991-11-16  |  5KB  |  145 lines

  1. /*****************************************************************************
  2. *                              MAKEFILE
  3. *
  4. *  PURPOSE: Build the following modules:
  5. *
  6. *           "a_hello.obj"
  7. *           "a_world.obj"
  8. *           "hello.obj"
  9. *           "world.obj"
  10. *           "message.lib"
  11. *           "greeting.obj"
  12. *           "greeting.exe"
  13. *
  14. *  NOTE: None of the comments in this make file are required.  They have
  15. *        been provided to help you understand how CMAKE handles each
  16. *        command.  In other words, this make file could be reduced down to
  17. *        the following seven commands:
  18. *
  19. *        masm /W2 /V /Z a_hello.asm,a_hello.obj;
  20. *        masm /W2 /V /Z a_world.asm,a_world.obj;
  21. *        cl /c /W4 hello.c
  22. *        cl /c /W4 world.c
  23. *        lib @message.lrf
  24. *        cl /c /W4 greeting.c
  25. *        link @greeting.lnk
  26. *
  27. *****************************************************************************/
  28.  
  29. /*****************************************************************************
  30. *                             A_HELLO.OBJ
  31. *
  32. *  The following MASM command will be executed only when one of the
  33. *  following conditions is true:
  34. *
  35. *  1. "a_hello.obj" does not exist.
  36. *  2. "a_hello.asm" is newer than "a_hello.obj".
  37. *  3. "hello.inc" is newer than "a_hello.obj".
  38. *
  39. *****************************************************************************/
  40.  
  41. masm /W2 /V /Z a_hello.asm,a_hello.obj;
  42.  
  43. /*****************************************************************************
  44. *                             A_WORLD.OBJ
  45. *
  46. *  The following MASM command will be executed only when one of the
  47. *  following conditions is true:
  48. *
  49. *  1. "a_world.obj" does not exist.
  50. *  2. "a_world.asm" is newer than "a_world.obj".
  51. *  3. "world.inc" is newer than "a_world.obj".
  52. *
  53. *****************************************************************************/
  54.  
  55. masm /W2 /V /Z a_world.asm,a_world.obj;
  56.  
  57. /*****************************************************************************
  58. *                              HELLO.OBJ
  59. *
  60. *  The following CL command will be executed only when one of the
  61. *  following conditions is true:
  62. *
  63. *  1. "hello.obj" does not exist.
  64. *  2. "hello.c" is newer than "hello.obj".
  65. *  3. "hello.h" is newer than "hello.obj".
  66. *
  67. *****************************************************************************/
  68.  
  69. cl /c /W4 hello.c
  70.  
  71. /*****************************************************************************
  72. *                               WORLD.OBJ
  73. *
  74. *  The following CL command will be executed only when one of the
  75. *  following conditions is true:
  76. *
  77. *  1. "world.obj" does not exist.
  78. *  2. "world.c" is newer than "world.obj".
  79. *  3. "world.h" is newer than "world.obj".
  80. *
  81. *****************************************************************************/
  82.  
  83. cl /c /W4 world.c
  84.  
  85. /*****************************************************************************
  86. *                              MESSAGE.LIB
  87. *
  88. *  The following LIB command will be executed only when one of the
  89. *  following conditions is true:
  90. *
  91. *  1. "message.lib" does not exist.
  92. *  2. "a_hello.obj" is newer than "message.lib".
  93. *  3. "a_world.obj" is newer than "message.lib".
  94. *  4. "hello.obj" is newer than "message.lib".
  95. *  5. "world.obj" is newer than "message.lib".
  96. *
  97. *  Actually, only those objects that are newer than the library,
  98. *  "message.lib", will be added to the library.  For example, suppose
  99. *  "message.lib" exists, "a_hello.obj" is newer than "message.lib", and
  100. *  "message.lib" is newer than "a_world.obj", "hello.obj", and "world.obj".
  101. *  In this case, only "a_hello.obj" must be added to the library,
  102. *  "message.lib".  Thus, in this case, CMAKE would execute the following
  103. *  command:
  104. *
  105. *  lib @message.clb
  106. *
  107. *  where "message.clb" consists of the following lines:
  108. *
  109. *  message.lib
  110. *  -+a_hello.obj ;
  111. *
  112. *****************************************************************************/
  113.  
  114. lib @message.lrf
  115.  
  116. /*****************************************************************************
  117. *                           GREETING.OBJ
  118. *
  119. *  The following CL command will be executed only when one of the
  120. *  following conditions is true:
  121. *
  122. *  1. "greeting.obj" does not exist.
  123. *  2. "greeting.c" is newer than "greeting.obj".
  124. *  3. "a_hello.h" is newer than "greeting.obj".
  125. *  4. "a_world.h" is newer than "greeting.obj".
  126. *  5. "greeting.h" is newer than "greeting.obj".
  127. *
  128. *****************************************************************************/
  129.  
  130. cl /c /W4 greeting.c
  131.  
  132. /*****************************************************************************
  133. *                           GREETING.EXE
  134. *
  135. *  The following LINK command will be executed only when one of the
  136. *  following conditions is true:
  137. *
  138. *  1. "greeting.exe" does not exist.
  139. *  2. "greeting.obj" is newer than "greeting.exe".
  140. *  3. "message.lib" is newer than "greeting.exe".
  141. *
  142. *****************************************************************************/
  143.  
  144. link @greeting.lnk
  145.